Custom scripts can be stored in the folder:

"~/Library/Application Scripts/com.codeux.irc.textual5/"

This folder might not exist. If it does not, create it. Textual does not
have write permission to this location so it cannot create it on its own.
Scripts installed within this folder benefit from the ability to be ran 
outside of the OS X sandbox giving them unrestricted access to the
system as a whole. 

Only OS X Mountain Lion or later can read scripts from this folder.
This is an unfortunate design flaw of the OS X sandbox that Textual
cannot circumvent. 

For more information, read the knowledge base:

http://www.codeux.com/textual/help/Writing-Scripts.kb